<?php
use \PsiFramework\Classes\Util\UI\Printer;
use \PsiFramework\Classes\Util\UI\HTML;

$text = $response->getAttribute("object");
$objectType = $response->getAttribute("objectType");
?>
<form
    class="editForm"
    method="POST"
    action="<?php Printer::display(HTML::linkHref('action=CMS.Save&type='.$objectType));?>">
    <?php
    if ($text != null) {
    ?>
    <input type="hidden" name="key"
        value="<?php Printer::display($text->getKey()); ?>" />
    <div class="label">
        <span class="titre">Clé :</span>
        <?php Printer::display($text->getKey()); ?>
    </div>
    <?php
    } else {
    ?>
    <div class="label">
        <span class="titre">Clé :</span>
        <input
            type="text"
            name="key"
            value="" />
    </div>
    <?php 
    }
    ?>
    <div class="label">
        <span class="titre">FR :</span>
        <textarea rows="20" cols="75" class="firstInput" name="fr"><?php
            if ($text != null) echo $text->getFr();
        ?></textarea>
    </div>
    <div class="label">
        <span class="titre">EN :</span>
        <textarea rows="20" cols="75" class="firstInput" name="en"><?php 
            if ($text != null) echo $text->getEn();
        ?></textarea>
    </div>
    <input type="submit" value="OK" />
</form>
